1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module adw.LeafletPage;
26 
27 private import adw.c.functions;
28 public  import adw.c.types;
29 private import glib.Str;
30 private import glib.c.functions;
31 private import gobject.ObjectG;
32 private import gtk.Widget;
33 
34 
35 /**
36  * An auxiliary class used by [class@Leaflet].
37  */
38 public class LeafletPage : ObjectG
39 {
40 	/** the main Gtk struct */
41 	protected AdwLeafletPage* adwLeafletPage;
42 
43 	/** Get the main Gtk struct */
44 	public AdwLeafletPage* getLeafletPageStruct(bool transferOwnership = false)
45 	{
46 		if (transferOwnership)
47 			ownedRef = false;
48 		return adwLeafletPage;
49 	}
50 
51 	/** the main Gtk struct as a void* */
52 	protected override void* getStruct()
53 	{
54 		return cast(void*)adwLeafletPage;
55 	}
56 
57 	/**
58 	 * Sets our main struct and passes it to the parent class.
59 	 */
60 	public this (AdwLeafletPage* adwLeafletPage, bool ownedRef = false)
61 	{
62 		this.adwLeafletPage = adwLeafletPage;
63 		super(cast(GObject*)adwLeafletPage, ownedRef);
64 	}
65 
66 
67 	/** */
68 	public static GType getType()
69 	{
70 		return adw_leaflet_page_get_type();
71 	}
72 
73 	/**
74 	 * Gets the leaflet child th which @self belongs.
75 	 *
76 	 * Returns: the child to which @self belongs
77 	 *
78 	 * Since: 1.0
79 	 */
80 	public Widget getChild()
81 	{
82 		auto __p = adw_leaflet_page_get_child(adwLeafletPage);
83 
84 		if(__p is null)
85 		{
86 			return null;
87 		}
88 
89 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p);
90 	}
91 
92 	/**
93 	 * Gets the name of @self.
94 	 *
95 	 * Returns: the name of @self.
96 	 *
97 	 * Since: 1.0
98 	 */
99 	public string getName()
100 	{
101 		return Str.toString(adw_leaflet_page_get_name(adwLeafletPage));
102 	}
103 
104 	/**
105 	 * Gets whether the child can be navigated to when folded.
106 	 *
107 	 * Returns: whether @self can be navigated to when folded
108 	 *
109 	 * Since: 1.0
110 	 */
111 	public bool getNavigatable()
112 	{
113 		return adw_leaflet_page_get_navigatable(adwLeafletPage) != 0;
114 	}
115 
116 	/**
117 	 * Sets the name of the @self.
118 	 *
119 	 * Params:
120 	 *     name = the new value to set
121 	 *
122 	 * Since: 1.0
123 	 */
124 	public void setName(string name)
125 	{
126 		adw_leaflet_page_set_name(adwLeafletPage, Str.toStringz(name));
127 	}
128 
129 	/**
130 	 * Sets whether @self can be navigated to when folded.
131 	 *
132 	 * Params:
133 	 *     navigatable = whether @self can be navigated to when folded
134 	 *
135 	 * Since: 1.0
136 	 */
137 	public void setNavigatable(bool navigatable)
138 	{
139 		adw_leaflet_page_set_navigatable(adwLeafletPage, navigatable);
140 	}
141 }